﻿namespace zijian666.Data.SqlBuilders;
public interface ISqlBuilder
{
    DbProviderFactory DbProvider { get; }

    string PagingSql(string sql, long begin, int count);

    string ConvertCountSql(string sql);

    string QuoteIdentifier(string tableName);

    string GetParameterHolder(string parameterName);

    DbParameter CreateParameter(object? value, string? typeName);


    IEnumerable<FormattableSql> InsertSql(IEnumerable<object> entities, string? tableName = null);

    IEnumerable<FormattableSql> DeleteSql(IEnumerable<object> entities, string? tableName = null);

    IEnumerable<FormattableSql> UpdateSql(IEnumerable<object> entities, string? tableName = null, Func<PropertyInfo, bool>? filter = null);

}

